package com.bojin.studio.ubattery.advice;

import java.util.List;

import com.bojin.studio.ubattery.R;
import com.bojin.studio.ubattery.adviceInfo;

import android.content.Context;
import android.provider.Settings;

public class ScreenAdvice {
	Context context=null;
	public ScreenAdvice(Context mcontext)
	{
		context=mcontext;
	}
	
	public void detect(List<adviceInfo> adviceList)
	{
		int time=Settings.System.getInt(context.getContentResolver(),Settings.System.SCREEN_OFF_TIMEOUT, 3000);
		if(time==-1)
		{
			adviceInfo adInfo=new adviceInfo();
			adInfo.icon=context.getResources().getDrawable(R.drawable.panel_picture_frame_bg_pressed_blue);
			adInfo.title=context.getResources().getString(R.string.s_control);
			adInfo.content="Your screen off setting is never turn off. ";
			adInfo.reason="Your screen off setting is never turn off. ";
			adInfo.action="Please adjust it";
			adviceList.add(adInfo);
		}
	}

}
